<?php

namespace Services\Log\Models;

use Helpers\BaseModel;
use Helpers\Main;
use Helpers\Tool;

class LoginLog extends BaseModel
{

    /**
     *
     * @var integer
     * @Primary
     * @Identity
     * @Column(type="integer", length=20, nullable=false)
     */
    public $lo_id;

    /**
     *
     * @var integer
     * @Column(type="integer", length=20, nullable=false)
     */
    public $lo_us_id;

    /**
     *
     * @var string
     * @Column(type="string", length=255, nullable=false)
     */
    public $lo_uid;

    /**
     *
     * @var string
     * @Column(type="string", length=50, nullable=false)
     */
    public $lo_os;

    /**
     *
     * @var string
     * @Column(type="string", length=50, nullable=false)
     */
    public $lo_processor;

    /**
     *
     * @var string
     * @Column(type="string", length=50, nullable=false)
     */
    public $lo_computername;

    /**
     *
     * @var string
     * @Column(type="string", length=50, nullable=false)
     */
    public $lo_user_agent;

    /**
     *
     * @var string
     * @Column(type="string", length=50, nullable=false)
     */
    public $lo_ip;

    /**
     *
     * @var string
     * @Column(type="string", length=50, nullable=false)
     */
    public $lo_language;

    /**
     *
     * @var string
     * @Column(type="string", nullable=false)
     */
    public $lo_date;

    /**
     *
     * @var string
     * @Column(type="string", length=50, nullable=true)
     */
    public $lo_mac;

    /**
     *
     * @var string
     * @Column(type="string", length=50, nullable=true)
     */
    public $lo_model;

    /**
     *
     * @var string
     * @Column(type="string", length=50, nullable=true)
     */
    public $lo_imei;

    /**
     * Initialize method for model.
     */
    public function initialize()
    {
        parent::initialize();
    }

    /**
     * Returns table name mapped in the model.
     *
     * @return string
     */
    public function getSource()
    {
        return 'login_log';
    }

    /**
     * Allows to query a set of records that match the specified conditions
     *
     * @param mixed $parameters
     * @return LoginLog[]|LoginLog|\Phalcon\Mvc\Model\ResultSetInterface
     */
    public static function find($parameters = null)
    {
        return parent::find($parameters);
    }

    /**
     * Allows to query the first record that match the specified conditions
     *
     * @param mixed $parameters
     * @return LoginLog|\Phalcon\Mvc\Model\ResultInterface
     */
    public static function findFirst($parameters = null)
    {
        return parent::findFirst($parameters);
    }
}
